import unittest
import parser
import yaml
import io
import datetime

class TestParser(unittest.TestCase):
    def setUp(self):
        self.config = yaml.load(io.open("config.otrplus.yaml", 'r'))

    def test_aggregate(self):
        issue = parser.tryParse("OW","OW-41",self.config)
        print(issue)
        # self.assertEqual(issue.changelogs,"READY FOR DEV,IN DEV,READY4QA,IN QA,READY FOR UAT,IN UAT,UAT DONE")
    # def test_getWorkDays(self):
    #     start,end = datetime.datetime(2018,11,21),datetime.datetime(2018,11,27)
    #     days = parser.getWorkDays(start,end)
    #     self.assertEqual(6,days)


if __name__ == '__main__':
    unittest.main()